﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Enyim.Collections
{
    public class RTreeNode<T>
    {
        private readonly List<RTreeNode<T>> children;

        internal RTreeNode() : this(default(T), new Envelope())
        {
        }

        public RTreeNode(T data, Envelope envelope)
        {
            Data = data;
            Envelope = envelope;
            children = new List<RTreeNode<T>>();
        }

        public T Data { get; private set; }

        public Envelope Envelope { get; internal set; }

        internal bool IsLeaf { get; set; }

        internal int Height { get; set; }

        internal List<RTreeNode<T>> Children { get { return children; } }
    }
}